<%@page import="twitter4j.User"%>
<%@page import="twitter4j.http.AccessToken"%>
<%@page import="twitter4j.TwitterFactory"%>
<%@page import="twitter4j.Twitter"%><%@
 taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" pageEncoding="UTF-8"%><%
	try {
		String CONSUMER_KEY = "SYwJg523pWZPjL32xDMw";
		String CONSUMER_SECRET = "t9vE5tFYE8CCAyJE4i62kWeNG4UywJSwiJmu5ATYI";
			
		String token = (String)session.getAttribute("token");
		String tokenSecret= (String)session.getAttribute("tokenSecret");
		
		Twitter twitter= new TwitterFactory().getOAuthAuthorizedInstance(CONSUMER_KEY, CONSUMER_SECRET, 
				new AccessToken(token,tokenSecret));
		int myId = twitter.getId();
		User me = twitter.showUser(myId);
		request.setAttribute("myInfo", me);
		me.getCreatedAt();
	} catch (Exception e) {
		out.println(e.getMessage());
		e.printStackTrace();
	}
%>
<html>
	<body>
		<form>
			<div>
				Below is an your account informations.<br/>
				There are so many.<br/>
				What is that we have to save on database?
			</div><br/>
			<div>
				Created at: <c:out value="${myInfo.createdAt}"></c:out><br/>
				Id: <c:out value="${myInfo.id}"></c:out><br/>
				Name: <c:out value="${myInfo.name}"></c:out><br/>
				ScreenName: <c:out value="${myInfo.screenName}"></c:out><br/>
				Location: <c:out value="${myInfo.location}"></c:out><br/>
				Description: <c:out value="${myInfo.description}"></c:out><br/>
				ContributorsEnabled: <c:out value="${myInfo.contributorsEnabled}"></c:out><br/>
				ProfileImageURL: <c:out value="${myInfo.profileImageURL}"></c:out><br/>
				URL: <c:out value="${myInfo.URL}"></c:out><br/>
				Protected: <c:out value="${myInfo.protected}"></c:out><br/>
				FollowersCount: <c:out value="${myInfo.followersCount}"></c:out><br/>
				Status: <c:out value="${myInfo.status}"></c:out><br/>
				ProfileTextColor: <c:out value="${myInfo.profileTextColor}"></c:out><br/>
				ProfileLinkColor: <c:out value="${myInfo.profileLinkColor}"></c:out><br/>
				ProfileSidebarFillColor: <c:out value="${myInfo.profileSidebarFillColor}"></c:out><br/>
				ProfileSidebarBorderColor: <c:out value="${myInfo.profileSidebarBorderColor}"></c:out><br/>
				FriendsCount: <c:out value="${myInfo.friendsCount}"></c:out><br/>
				CreatedAt(date form): <c:out value="${myInfo.createdAt}"></c:out><br/>
				FavouritesCount: <c:out value="${myInfo.favouritesCount}"></c:out><br/>
				UtcOffset: <c:out value="${myInfo.utcOffset}"></c:out><br/>
				TimeZone: <c:out value="${myInfo.timeZone}"></c:out><br/>
				ProfileBackgroundImageUrl: <c:out value="${myInfo.profileBackgroundImageUrl}"></c:out><br/>
				ProfileBackgroundTiled: <c:out value="${myInfo.profileBackgroundTiled}"></c:out><br/>
			</div>
		</form>
	</body>
</html>